<template>
    <view class="content">
        <van-nav-bar :title="scrolling? navBarTitle : '' " left-arrow @click-left="onClickLeft"> </van-nav-bar>
        <scroll-view class="scroll-content" scroll-y :lower-threshold="80" @scroll="scrollPage" show-scrollbar="false">
            <view class="tabTop">
                <view class="title"> {{navBarTitle}}</view>
                <view class="checkInBox"  @click="toCheckInDailyRecord">
                    <img src="https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/checkInBoxBg.png"
                        alt="">
                    <view class="checkInBoxTop">
                        <view class="checkedInDay">已经连续签到{{continuousSignInDays}}天</view>
                        <view class="record" @click="toCheckInDailyRecord">查看签到记录 <van-icon name="arrow" style="margin-left: 13rpx;" /> </view>
                    </view>
                    <view class="checkInBoxBottom">
                        <view class="hezi" v-if="blindBoxRemainingDays>0">还剩{{blindBoxRemainingDays}}天获得7天签到盲盒</view>
                        <view class="hezi" v-else>7天签到盲盒</view>
                        <view class="checkedInProgress">
                            <van-progress :percentage="Number((Number(7-blindBoxRemainingDays)/ 7) * 100).toFixed(0)" stroke-width="9px"
                            color="#F1551C" track-color="#E7E7E7" show-pivot="false" show-info="false" />
                        </view>
                    </view>
                </view>
                <view class="pointsTasksBox">
                    <view class="tasksBoxTitle">做任务得奖励</view>
                    <view class="pointsTasksList">
                        <view class="tasksItemBox" v-for="(item,index) in pointsTasksList" :key="index">
                            <view class="tasksItemBoxLeft">
                                <view class="tasksIcon">
                                    <img :src="item.taskIcon" alt="" style="width: 66rpx; height: 66rpx;">
                                </view>
                                <view class="tasksContent">
                                    <view class="tasksName">{{ item.taskName }} <span v-if="item.taskDuration>0">{{item.taskDuration}}s</span> <span v-if="item.dailyCompletionCount>2">（{{item.completedCount}}/{{item.dailyCompletionCount}}）</span>  </view>
                                    <view :class="[item.rewardPoints <100 ?'tasksNum':'tasksNum100']">
                                        <img :src="item.rewardPoints <100 ? tasksNumImg : tasksNum100Img" alt="" >
                                        <view class="text">积</view> <view class="num"> <span style="font-size: 24rpx;">+</span> {{ item.rewardPoints }}</view> 
                                    </view>
                                </view>
                            </view>
                            <view class="tasksStatus" :class="{'gray':item.isCompleted===true}" @click="handleTaskAction(item)">{{item.isCompleted? '已完成' :(item.buttonName?item.buttonName:'去完成')}}</view>
                        </view>
                    </view>
                </view>
            </view>

        </scroll-view>

    </view>
</template>

<script>
import {getEarnPointsApi} from '@/api/points'
import {dailyCheckInTaskApi,completeTaskApi} from '@/api/checkedInTask'
export default {
    data() {
        return {
            navBarTitle: '赚积分',
            scrolling:false,
            
            params:{}, //接受从路由传过来的参数
            continuousSignInDays: 0, //连续签到天数
            blindBoxRemainingDays: 0, //7天签到盲盒剩余天数
            pointsTasksList:[
                {
                    taskIcon:'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/tasksCheckinDailyIcon.png',
                    taskName:'完成每日签到',
                    rewardPoints:1,
                    isCompleted:false,
                    buttonName:'去签到'
                },
                {
                    taskIcon:'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/tasksVideoIcon.png',
                    taskName:'观看视频广告',
                    rewardPoints:10,
                    isCompleted:false,
                    buttonName:'去看看',
                    completedCount:1,
                    dailyCompletionCount:10
                },
                {
                    taskIcon:'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/tasksMallIcon.png',
                    taskName:'逛逛惊喜商城',
                    rewardPoints:1,
                    isCompleted:false,
                    taskDuration:15,
                    buttonName:'逛一逛'
                },
                {
                    taskIcon:'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/tasksMakeOrderIcon.png',
                    taskName:'下单惊喜商城商品',
                    rewardPoints:10,
                    isCompleted:false,
                    buttonName:'去下单'
                },
                {
                    taskIcon:'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/tasksActivitiesIcon.png',
                    taskName:'报名参与活动',
                    rewardPoints:3,
                    isCompleted:false,
                    buttonName:'去完成'
                },
                {
                    taskIcon:'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/tasksNewMemberIcon.png',
                    taskName:'邀请新用户完成注册',
                    rewardPoints:100,
                    isCompleted:false,
                    buttonName:'去邀请',
                    completedCount:0,
                    dailyCompletionCount:20
                }
            ],
            timer: null,
            remainingTime: 15,
            isInMall: false,
            startTime: 0,
            tasksNumImg:'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/tasksNumBg.png',
            tasksNum100Img:'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/tasksNum100Bg.png',
            taskManagementId:undefined, //任务id
        }
    },
    onLoad(data) {
      
    },
    mounted() {
        // 监听商城任务完成事件
        uni.$on('mallTaskCompleted', (data) => {
            const task = this.pointsTasksList.find(item => item.id === data.taskId);
            if (task && !task.isCompleted) {
                this.completeTask(task);
            }
        });
    },

    beforeDestroy() {
        // 移除全局事件监听
        uni.$off('mallPageShow');
        uni.$off('mallPageHide');
        uni.$off('mallTaskCompleted');
        // 清除定时器
        clearInterval(this.timer);
    },
    onShow() {
    	this.getPointsTasksList()

    },
    methods: {
        // 滑动
        scrollPage(e) {
            console.log(e.detail.scrollTop, this.scrolling)
            if (e.detail.scrollTop > 25 && !this.scrolling) {
                this.scrolling = true
            } else if ((e.detail.scrollTop <= 25 && this.scrolling) || (e.detail.scrollTop <= 25 && !this.scrolling)) {
                this.scrolling = false
            }
        },
        // 返回键
        onClickLeft () {
            uni.navigateBack()
        },
        // 查看每日签到记录
        toCheckInDailyRecord(){
            uni.navigateTo({
                url:'/pages/integral/checkInRecords'
            })
        },

        handleTaskAction(item) {
            console.log(item,item.taskName,'handleTaskAction')
            // if (item.isCompleted) return;
            const taskKeywords = {
                'checkIn': ['签到'],
                'videoAd': ['视频广告', '观看视频'],
                'visitMall': ['逛逛商城', '访问商城'],
                'makeOrder': ['下单', '购买'],
                'activity': ['活动', '报名'],
                'invite': ['邀请', '推荐']
            };
            // const handlers = {
            //     '每日签到': this.handleCheckIn,
            //     '观看视频广告': this.handleVideoAd,
            //     '逛逛惊喜商城': this.startMallTimer,
            //     '下单惊喜商城商品': this.handleMakeOrder,
            //     '报名参与活动': this.handleActivities,
            // }

            // handlers[item.taskName]?.call(this, item);
             // 根据任务名称中的关键词判断任务类型
            if (item.taskName.includes('签到')) {
                this.handleCheckIn(item);
            } else if (item.taskName.includes('视频广告')) {
                this.handleVideoAd(item);
            } else if (item.taskName.includes('商城')) {
                if (item.taskName.includes('逛逛')) {
                    this.startMallTimer(item);
                } else if (item.taskName.includes('下单')) {
                    this.handleMakeOrder(item);
                }
            } else if (item.taskName.includes('活动')) {
                this.handleActivities(item);
            } else if (item.taskName.includes('服务商品')) {
                if(item.taskName.includes('浏览')){
                    this.handleBrowseLifeService(item); 
                }else if(item.taskName.includes('下单')){
                    this.handleMakeOrderService(item);
                }
            } else if (item.taskName.includes('预约到家服务')) {
                // 新增“预约到家服务”任务处理
                this.handleHomeServiceBooking(item); 
            } else if (item.taskName.includes('邀请新用户')) {
                // 新增“邀请新用户完成注册”任务处理
                this.handleInviteNewUser(item);
            }else if(item.taskName.includes('评价')){
            	if(item.taskName.includes('惊喜商品')){
            		this.handleJudgeProduct(item);
            	}else if(item.taskName.includes('服务')){
            		this.handleJudgeServiceEmp(item);
            	}
            }else if(item.taskName.includes('地址')){
            	this.handleAddress(item);
            }else if(item.taskName.includes('物业费')){
            	this.handlePropertyFee(item);
            }
        },

        // 每日签到处理
        async handleCheckIn(item) {
            console.log('handleCheckIn')
            if (item.isCompleted) return;

            uni.showLoading({ title: '签到中...' });
            try {
               const res = await dailyCheckInTaskApi({id:item.id})
                if (res.code == 200) {
                    item.isCompleted = true;
                    uni.showToast({ title: `签到成功 +${item.rewardPoints}积分` });
                    // uni.showModal({
                    //     title: '签到成功',
                    //     content: '恭喜您连续签到7天，获得7天签到盲盒',
                    //     showCancel: false,
                    // })
                    // 检查是否连续签到 并更新任务状态
                    if(res.data.isBlindBoxAutoReceive){
                        const params ={
                            taskManagementId:res.data?.taskManagementId || undefined,
                        }
                        uni.navigateTo({
                            url: '/pages/blindBox/openBlindBox?params=' + encodeURIComponent(JSON.stringify(params))
                        })
                    }else{
                        this.getPointsTasksList()
                    }
                }
              
            } catch (error) {
                uni.showToast({ title: '签到失败', icon: 'none' });
            }
        },
        // 浏览服务的商品详情
        handleBrowseLifeService(item) {
           // 清除现有定时器
            if (this.timer) clearInterval(this.timer);
            
            // 设置全局标识
            getApp().globalData.fromEarnPoints = true;
            getApp().globalData.currentTask = item;
            getApp().globalData.taskType = 'life_service'; // 区分任务类型
            uni.switchTab({
                url: '/pages/find/index',
                success: () => {
                    // 延迟确保页面加载完成
                    setTimeout(() => {
                        const pages = getCurrentPages();
                        if (pages.length > 0) {
                            const findPage = pages[pages.length - 1];
                            if (findPage.route === 'pages/find/index') {
                                // 触发服务按钮点击
                                findPage.$vm.onTabClick(0);

                                // 开始计时
                                this.startTime = Date.now();
                                this.timer = setInterval(() => {
                                    const elapsed = Date.now() - this.startTime;
                                    if (elapsed >= item.taskDuration * 1000) {
                                        this.completeTask(item);
                                    }
                                }, 1000);
                            }
                        }
                    }, 500); // 适当延迟确保页面渲染完成
                }
            });

        },
        // 去下单服务的商品
        handleMakeOrderService(item) {
            // 清除现有定时器
            if (this.timer) clearInterval(this.timer);
            // 设置全局标识
            getApp().globalData.fromEarnPoints = true;
            getApp().globalData.currentTask = item;
            getApp().globalData.taskType = 'life_service'; // 区分任务类型
        },

        // 视频广告处理
        handleVideoAd(item) {
            // 设置全局标识
            getApp().globalData.fromEarnPoints = true;
            getApp().globalData.currentTask = item;
            const videoAd = this.createVideoAd();
            videoAd.show().catch(() => {
                videoAd.load().then(() => videoAd.show());
            });
        },

        // 创建广告实例
        createVideoAd(item) {
            let videoAd = null;
            if (wx.createRewardedVideoAd) {
                videoAd = wx.createRewardedVideoAd({
                    adUnitId: 'xxxxxx' // 替换为实际广告单元ID
                });
                videoAd.onClose(res => {
                    if (res && res.isEnded) {
                        // 用户完整观看了广告
                        this.updateVideoTask(item);
                    }else {
                        // 用户未完整观看
                        uni.showToast({
                            title: '未完整观看视频',
                            icon: 'none'
                        });
                    }
                });
                 // 监听广告错误
                videoAd.onError(err => {
                    console.error('广告加载失败:', err);
                    uni.showToast({
                        title: '广告加载失败',
                        icon: 'none'
                    });
                });
            }
            return videoAd;
        },
        // 更新视频任务状态
        async updateVideoTask(item) {
            try {
                const res = await completeTaskApi({ taskManagementId: this.currentTask.id });
                if (res.code == 200) {
                    uni.showToast({
                        title: `任务完成，获得${this.currentTask.rewardPoints}积分`,
                        icon: 'success'
                    });
                    this.getPointsTasksList(); // 刷新任务列表
                }
            } catch (error) {
                uni.showToast({
                    title: '任务更新失败',
                    icon: 'none'
                });
            }
        },

        // 处理下单任务
        handleMakeOrder(item) {
            uni.showModal({
                title: '任务提示',
                content: '前往商城下单任意商品即可完成任务',
                success: () => {
                    uni.switchTab({ url: '/pages/surprise/index' });
                    this.listenOrderSuccess(item);
                }
            });
        },

        // 监听订单成功
        listenOrderSuccess(item) {
            const handler = data => {
                if (data.orderStatus === 'success') {
                    item.isCompleted = true;
                    uni.$off('orderCreated', handler);
                }
            };
            uni.$on('orderCreated', handler);
        },
      
        // 处理浏览惊喜商城任务
        startMallTimer(item) {
            // 清除现有定时器
            if (this.timer) clearInterval(this.timer);

            // 设置全局标识
            getApp().globalData.fromEarnPoints = true;
            getApp().globalData.currentTask = item;
            getApp().globalData.taskType = 'surprise'; // 区分任务类型

            // 跳转到商城页面
            uni.switchTab({
                url: '/pages/surprise/index',
                success: () => {
                    // 商城页面加载成功后开始计时
                    // this.startTime = Date.now();
                    // this.timer = setInterval(() => {
                    //     const elapsed = Date.now() - this.startTime;
                    //     if (elapsed >= 15000) {
                    //         this.completeTask(item);
                    //     }
                    // }, 1000);
                    const eventChannel = this.getOpenerEventChannel();
                    if (eventChannel) {
                        eventChannel.on('mallTaskCompleted', () => {
                            clearInterval(this.timer);
                            if (!item.isCompleted) {
                                uni.showToast({
                                    title: '浏览任务未完成',
                                    icon: 'none'
                                });
                            }
                        });
                    }
                }
            });
             // 使用全局事件监听
            uni.$once('mallTaskReturn', () => {
                clearInterval(this.timer);
                if (!item.isCompleted) {
                    uni.showToast({
                        title: '浏览任务未完成',
                        icon: 'none'
                    });
                }
            });
            // // 监听页面返回事件
            // const pages = getCurrentPages();
            // if (pages.length > 1) {
            //     const prevPage = pages[pages.length - 2];
            //     prevPage.$on('hook:beforeDestroy', () => {
            //         clearInterval(this.timer);
            //         if (!item.isCompleted) {
            //             uni.showToast({
            //                 title: '浏览任务未完成',
            //                 icon: 'none'
            //             });
            //         }
            //     });
            // }
        },

        // 处理首次新增地址任务
        handleAddress(item) {
            // 设置全局标识
            getApp().globalData.fromEarnPoints = true;
            getApp().globalData.currentTask = item;
            getApp().globalData.taskType = 'first_add_address'; // 区分任务类型

            // 跳转到地址管理页面 //如果当前用户没有地址
            uni.navigateTo({
                url: '/pages/address/addAddress',
                success: () => {
                    // 监听地址新增成功事件
                    uni.$once('addressAdded', () => {
                        this.completeTask(item);
                    });
                }
            });
            // 如果当前用户已有地址，则跳转至用户收货地址列表，直接完成任务  发送积分
        },

        // 处理评论商品任务
        handleJudgeProduct(item) {
            // 设置全局标识
            getApp().globalData.fromEarnPoints = true;
            getApp().globalData.currentTask = item;
            getApp().globalData.taskType = 'comment_product'; // 区分任务类型
            const params = {
                activeTab:4,
                orderStatus:2,
            }

            // 跳转到商品详情页
            uni.navigateTo({
                url: '/pages/orders/myOrder?params=' + encodeURIComponent(JSON.stringify(params)),
                success: () => {
                    // 监听评论成功事件
                    uni.$once('commentSuccess', () => {
                        this.completeTask(item);
                    });
                }
            })
        },
        // 处理评论服务任务
        handleJudgeServiceEmp(item) {
            // 设置全局标识
            getApp().globalData.fromEarnPoints = true;
            getApp().globalData.currentTask = item;
            getApp().globalData.taskType = 'comment_service'; // 区分任务类型
            const params = {
                activeTab:2,
                // orderStatus:2,
            }
            // 跳转到我的服务待评价订单页
            uni.navigateTo({
                url: '/pages/myService/myService?params=' + encodeURIComponent(JSON.stringify(params)),
                success: () => {
                    // 监听评论成功事件
                    uni.$once('commentSuccess', () => {
                        this.completeTask(item);
                    });
                }
            })
        },
        // 处理预约到家服务任务
        handleHomeServiceBooking(item) {
            // 设置全局标识
            getApp().globalData.fromEarnPoints = true;
            getApp().globalData.currentTask = item;
            getApp().globalData.taskType = 'home_service_booking'; // 区分任务类型
            const params = { activeTab:0, }
            // 跳转到我的服务待评价订单页
            uni.navigateTo({
                url: '/pages/myService/myService?params=' + encodeURIComponent(JSON.stringify(params)),
                success: () => {
                    // 监听评论成功事件
                    uni.$once('commentSuccess', () => {
                        this.completeTask(item);
                    });
                }
            })
        },

        // 完成任务
        completeTask(item) {
            item.isCompleted =  true
            completeTaskApi({taskManagementId:item.id}).then(res=>{
                if(res.code == 200){
                    uni.showToast({
                        title: `任务完成,获得${item.rewardPoints}积分`,
                        icon: 'success'
                    });
                }
            })
            // 清理事件监听
            this.cleanupEvents();
            // 移除事件监听
            uni.$off('mallPageShow');
            uni.$off('mallPageHide');
        },

        handleTaskReturn(item) {
            if (!item.isCompleted) {
                uni.showToast({ title: '浏览任务未完成', icon: 'none' });
            }
            this.cleanupEvents();
        },

        cleanupEvents() {
            uni.$off('mallPageShow');
            uni.$off('mallPageHide');
            uni.$off('navigateBack');
            clearInterval(this.timer);
        },
        // 处理活动任务
        handleActivities(item) {
            uni.showModal({
                title: '任务提示',
                content: '前往活动页面参与活动即可完成任务',
                success: () => {
                    const params = {
                        pageBiaoshi : 'activity',
                        fromEarnPoints: true // 添加来源标识
                    }
                    uni.navigateTo({
                        url: '/pages/findPage/activitiesList?params=' +
                            encodeURIComponent(JSON.stringify(params))
                    })
                    // uni.switchTab({ url: '/pages/activity/index' });
                    this.listenActivitySuccess(item);
                }
            });
        },
        // 监听活动任务成功
        listenActivitySuccess(item) {
            const handler = data => {
                if (data.activityStatus === 'success') {
                    item.isCompleted = true;
                    uni.$off('activityJoined', handler);
                    uni.showToast({
                        title: '活动参与成功!',
                        icon: 'success'
                    });
                }
            };
            const errorHandler = (err) => {
            console.error('Activity error:', err);
            uni.showToast({
                title: '活动参与失败',
                icon: 'none'
            });
        };

        uni.$on('activityJoined', handler);
        uni.$on('activityError', errorHandler);
        
        // Cleanup event listeners when component destroys
        this.$once('hook:beforeDestroy', () => {
            uni.$off('activityJoined', handler);
            uni.$off('activityError', errorHandler);
        });
        },
        // // 处理参与活动任务
        // handleActivities(item){
        //     const params = {
        //         pageBiaoshi : 'activity',
        //         fromEarnPoints: true // 添加来源标识
        //     }
        //     uni.navigateTo({
        //         url: '/pages/findPage/activitiesList?params=' +
        //             encodeURIComponent(JSON.stringify(params))
        //     })
        // },
        // 获取任务列表
        async getPointsTasksList() {
            const res = await getEarnPointsApi()
            if (res.code == 200) {
                this.continuousSignInDays = res.data?.continuousSignInDays || 0;
                this.blindBoxRemainingDays = res.data?.blindBoxRemainingDays || 0;
                this.pointsTasksList = res.data?.taskDetailsResponses || []
            }
        }

    }
}
</script>

<style lang="scss" scoped>
.content {
    background-color: #ffffff;
    display: flex;
    flex-direction:column;
    height:100vh;
    overflow:hidden;
    box-sizing: border-box;
    padding-bottom: calc(0rpx + env(safe-area-inset-bottom));
}
.scroll-content {
    flex: 1;
    height: 1px;
}
.tabTop{
    padding:0rpx 48rpx;
}
.title{
    font-size: 60rpx;
    text-align: left;
    color: #111111;
}
.checkInBox{
    margin-top: 73rpx;
    width: 100%;
    height: 290px;
    // background: url('https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/checkInBoxBg.png') no-repeat;
    // background-size: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    // padding: 48rpx;
    position: relative;

    img{
        width: 100%;
        height: 290px;
    }

    .checkInBoxTop{
        position: absolute;
        top: 24rpx;
        left: 24rpx;

        .checkedInDay{
            font-size: 40rpx;
            color: #111111;
            line-height: 40rpx;
        }
        .record{
            font-size: 24rpx;
            color: #111111;
            line-height: 24rpx;
            margin-top: 28rpx;
        }
    }

    .checkInBoxBottom{
        position: absolute;
        bottom: 24rpx;
        left:24rpx;
        width: calc(100% - 24px);

        .hezi{
            font-size: 26rpx;
            color: #111111;
            line-height: 26rpx;
        }
        .checkedInProgress{
            margin-top:27rpx ;
        }
    }

}
.pointsTasksBox{
    margin-top: 64rpx;
    padding-bottom: calc(18rpx + env(safe-area-inset-bottom));   //底部  18+36=54px

    .tasksBoxTitle{
        font-size: 40rpx;
        color: #111111;
        line-height:40rpx ;
    }
    .pointsTasksList{
        margin-top: 18rpx;  //18+36=54px
    }
    .tasksItemBox{
        padding: 36rpx 0rpx;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 2rpx solid #f0f0f0;

        .tasksItemBoxLeft{
            display: flex;
            align-items: center;
        }
        .tasksContent{
            padding-left: 40rpx;
            .tasksName{
                font-size: 32rpx;
                color: #111111;
                line-height: 32rpx;
            }
            .tasksNum{
                margin-top: 14rpx;
                width: 126rpx;
                height: 46rpx;
                position: relative;
                img{
                    width: 100%;
                    height: 46rpx;
                }
                .text{
                    width: 20rpx;
                    font-size: 20rpx;
                    color: #ffffff;
                    line-height: 20rpx;
                    position: absolute;
                    top: 13rpx;
                    left: 13rpx;
                }
                .num{
                    position: absolute;
                    top: 8rpx;
                    left: 58rpx;
                    font-size: 30rpx;
                    color: #ff6203;
                    display: flex;
                    align-items: center;
                    line-height: 30rpx;
                }
            }
            .tasksNum100{
                margin-top: 14rpx;
                width: 152rpx;
                height: 46rpx;
                position: relative;
                img{
                    width: 100%;
                    height: 46rpx;
                }
                .text{
                    width: 20rpx;
                    font-size: 20rpx;
                    color: #ffffff;
                    line-height: 20rpx;
                    position: absolute;
                    top: 13rpx;
                    left: 13rpx;
                }
                .num{
                    position: absolute;
                    top: 8rpx;
                    left: 58rpx;
                    font-size: 30rpx;
                    color: #ff6203;
                    display: flex;
                    align-items: center;
                    line-height: 30rpx;
                }
            }
        }
        .tasksStatus{
            font-size: 24rpx;
            line-height: 24rpx;
            padding:13rpx 25rpx;
            text-align: center;
            color: #FFFFFF;
            border-radius: 9px;
            background: #ff6203;
        }
        .gray{
            border-radius: 9px;
            background: #d4d4d4;
        }
    }
    .tasksItemBox:last-child{
        border-bottom: none;
    }
}

::v-deep .van-nav-bar__left {
    width: 56px;
    height: 44px;
}

::v-deep .van-icon {
    color: #242629 !important;
}

::v-deep .van-cell{
    padding-left: 0px !important;
    border-bottom: 1px solid #f9f9f9;
}
// 滚动条 去掉自带的文字提示  
::v-deep .van-progress__pivot {
	display: none;
}
</style>
